<template>
  <!--搜索输入框-->
  <el-input  @change="ItemValChange" :value="element.procFormData">
    <el-button slot="append" icon="el-icon-search" @click="openSearch()"></el-button>
  </el-input>
</template>

<script>

export default {
  name: 'SearchInput',
  props: {
    element: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
    }
  },
  created() {
  },
  methods: {
    openSearch(){
      let searchModel = {
        model: this.element['searchModel'],
        isOpenSearch: true
      }
      this.$emit('openSearchModel', searchModel)
    },
    ItemValChange(val) {
      let data = {
        key: this.itemInfo.columnName,
        val: val
      }
      this.$emit('ItemValChange', data)
    },
  },
}
</script>

<style scoped>
.edit .el-form-item__content .el-input {
  /*width: calc(50%) !important;*/
  min-width: 300px;
  max-width: 500px;
}

.query > .el-form-item__content {
  margin-left: 0px !important;
}
</style>
